﻿using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;

namespace AMS.DataAccess.Sql
{
    class WebNhbSession
    {
        private WebNhbSession()
        {
        }

        //private static volatile object syncObj = new object();
        //public const string NhbSessionKey = "2AFBC5D8-A402-4FB7-B80A-07FE3C28F89D";

        //public static ISession Session
        //{
        //    get
        //    {
        //        lock (syncObj)
        //        {
        //            ISession session = System.Web.HttpContext.Current.Session[NhbSessionKey] as ISession;
        //            if (session == null)
        //            {
        //                session = AMS.ORM.Common.NHibernateSession.Session;
        //                System.Web.HttpContext.Current.Session[NhbSessionKey] = session;
        //            }

        //            return session;
        //        }
        //    }
        //}

        //public static ISession NewSession
        //{
        //    get
        //    {
        //        return AMS.ORM.Common.NHibernateSession.Session;
        //    }
        //}
    }
}
